﻿<UserControl x:Class="Songhay.BiggestBox.Desktop.Modules.Exceptions.Views.ExceptionsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d"
    xmlns:rxSharedModels="clr-namespace:Songhay.BiggestBox.Portable.Shared.Models;assembly=Songhay.BiggestBox.Portable.Shared"
    d:DesignWidth="{x:Static rxSharedModels:AppScalars.ModuleWidth}" d:DesignHeight="{x:Static rxSharedModels:AppScalars.ModuleHeight}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.Resources>
            <Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
                <Setter Property="Margin" Value="32 0" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>
        </Grid.Resources>
        <Button
            Click="ThrowException"
            Content="Throw UI-Thread Exception"
            />
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="10*" />
                <ColumnDefinition Width="90*" />
            </Grid.ColumnDefinitions>
            <CheckBox Name="ShouldCloseApp"
                Content="Close App?"
                HorizontalAlignment="Right"
                ToolTip="When the exception is thrown, close the App?"
                />
            <Button Grid.Column="1"
                Click="ThrowThreadException"
                Content="Throw Task-Thread Exception"
                />
        </Grid>
    </Grid>
</UserControl>
